package net.mysoft.budgetsoft.system.domain;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * 
 * @author dagongPGP v1.0
 * @link <a href=http://www.mysoft.net>北京大公信软科技有限公司</a>
 * 
 * @version $Revision: 1.00 $Date: 2013-12-27 13:47:58
 */
//@Entity
//@Table(name = "YongHuJS")
public class TYongHuJS implements java.io.Serializable {
	private String bianHao;
	private TYongHu tYongHu;
	private TJueSe tJueSe;

	@Id
	@Column(name = "BianHao", unique = true, nullable = false)
	public String getBianHao() {
		return this.bianHao;
	}

	public void setBianHao(String bianHao) {
		this.bianHao = bianHao;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "YongHuBH")
	public TYongHu gettYongHu() {
		return tYongHu;
	}

	public void settYongHu(TYongHu tYongHu) {
		this.tYongHu = tYongHu;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "JueSeBH")
	public TJueSe gettJueSe() {
		return tJueSe;
	}

	public void settJueSe(TJueSe tJueSe) {
		this.tJueSe = tJueSe;
	}

	@Override
	public int hashCode() {
		int prime = 0;
		prime += this.getBianHao().hashCode();
		return prime;
	}

	@Override
	public boolean equals(Object obj) {
		boolean isEquals = false;
		if (obj != null && this.getClass() == obj.getClass()) {
			TYongHuJS clazz = (TYongHuJS) obj;
			if (clazz.getBianHao().equals(this.getBianHao()))
				isEquals = true;
			return isEquals;
		}
		return isEquals;
	}

}